package galaxies;

import galaxies.enums.EGalaxyType;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

import model.IModel;
import model.AbstractModel;
import model.PhysicalDataModel;
import utilities.Key;
import view.AbstractView;
import view.IView;

import com.jme3.math.Matrix3f;
import com.jme3.math.Vector2f;
import com.jme3.math.Vector3f;

import controller.IController;

/* Contains base variables, methods for all galaxy classes
 * Mainly a constructor class, creates stars, planets, etc. and assigns them to 
 * universe object
 */
public class GalaxyModel extends AbstractModel {
	
	private ArrayList<ArrayList<Integer>> dims = new ArrayList<ArrayList<Integer>>(); //boundary points of galaxy (x,y)
		
	private int galaxyDensity; //density of stars in the galaxy
	private EGalaxyType galaxyType;
	private int galaxySize;
	
	//private HashSet<Key> coordinateKeys = new HashSet<Key>();
	private HashMap<Integer, ArrayList<Integer>> locations = new HashMap<Integer, ArrayList<Integer>>();
	
	public GalaxyModel(int galSize, EGalaxyType galaxyType, int galaxyDensity){
//		this.variables.put("GalaxySize", new Double(galSize));
		this.galaxySize = galSize;
		this.galaxyType = galaxyType;
		this.galaxyDensity = galaxyDensity;		
	}
	
	public ArrayList<ArrayList<Integer>> getDims() {
		return this.dims;
	}
	
	public void setDims(ArrayList<ArrayList<Integer>> dims) {
		this.dims = dims;
	}
	
	public int getGalaxyDensity() {
		return galaxyDensity;
	}

	public void setGalaxyDensity(int galaxyDensity) {
		this.galaxyDensity = galaxyDensity;
	}

	public EGalaxyType getGalaxyType() {
		return galaxyType;
	}

	public void setGalaxyType(EGalaxyType galaxyType) {
		this.galaxyType = galaxyType;
	}
	
	public int getGalaxySize() {
		return this.galaxySize;
	}
	
	public void setGalaxySize(int size) {
		this.galaxySize = size;
	}

	public void addLocation(ArrayList<Integer> location) {
		this.locations.put(locations.size(), location);
	}
	
	public void setLocations(HashMap<Integer, ArrayList<Integer>> locations) {
		this.locations = locations;
	}
	
//	public void addAllLocations(ArrayList<Integer> locations) {
//		for (ArrayList)
//		
//		this.locations.putAll(locations);
//	}
	
	public void removeLocation(int i) {
		this.locations.remove(i);
	}

	public HashMap<Integer, ArrayList<Integer>> getLocations() {
		return locations;
	}	
}
